🪲 [Fix]: Fix debug and verbose inputs#61
Merged
MariusStorhaug merged 3 commits intomainfrom Jul 1, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR centralizes debug/verbose settings by removing hardcoded preferences from scripts and enabling dynamic configuration via action inputs, plus adds a debug flag to the GitHub user lookup in the test workflow.
- Removed redundant
$DebugPreferenceand$VerbosePreferencesettings inoutputs.ps1andinfo.ps1 - Added dynamic Debug/Verbose preferences in
action.ymlbased on inputs - Updated
.github/workflows/TestWorkflow.ymlto callGet-GitHubUserwith-Debug
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/outputs.ps1 | Removed hardcoded Debug/VerbosePreference settings |
| scripts/info.ps1 | Removed redundant Debug/VerbosePreference settings in end |
| action.yml | Added dynamic DebugPreference and VerbosePreference setup |
| .github/workflows/TestWorkflow.yml | Added -Debug flag to Get-GitHubUser for enhanced output |
Comments suppressed due to low confidence (3)
.github/workflows/TestWorkflow.yml:412
- Piping the output of
Get-GitHubUser -DebugintoFormat-Tablewill only format object output; debug messages go to the Debug stream and won’t be captured. To include debug messages in the log, redirect the Debug stream into the success stream (e.g.,Get-GitHubUser -Debug 4>&1 | Format-Table -AutoSize | Out-String).
Get-GitHubUser -Debug | Format-Table -AutoSize | Out-String
action.yml:95
- Ensure that
DebugandVerboseinputs are declared under theinputs:section inaction.ymlso that these environment variables are properly set and validated.
$DebugPreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Debug -eq 'true' ? 'Continue' : 'SilentlyContinue'
action.yml:95
- [nitpick] Add documentation for the new
DebugandVerboseinputs (descriptions and default values) inaction.ymlto clarify how to enable or suppress debug/verbose messages.
$DebugPreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Debug -eq 'true' ? 'Continue' : 'SilentlyContinue'
…y their scope in the action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces updates to improve debug and verbose output handling across the GitHub PowerShell-based action. The changes ensure consistent configuration of debug and verbose preferences and enhance clarity in documentation and workflow files.
Debug and Verbose Output Handling Updates:
.github/workflows/TestWorkflow.yml: Added the-Debugparameter to theGet-GitHubUsercommand to enable debug output during the workflow execution.action.yml: Updated the descriptions forDebugandVerboseinputs to clarify that they enable debug and verbose output for the entire action. Additionally, configured$DebugPreferenceand$VerbosePreferencebased on input values to set PowerShell preferences dynamically. [1] [2]scripts/info.ps1: Removed redundant$DebugPreferenceand$VerbosePreferenceconfiguration from theendblock, as these preferences are now set globally in the action runner.scripts/outputs.ps1: Removed hardcoded$DebugPreferenceand$VerbosePreferencesettings to align with the new dynamic configuration approach.Documentation Updates:
README.md: Improved descriptions forDebugandVerboseinputs to specify that they enable output for the entire action, enhancing clarity for users.